Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Returns a table of the entire stack’s information. Table array fields: source (definition), line (start line), what (“Lua”, “C”), name, func.
function debug.getcallstack(offset: number): table
getcallstack
local function foo() local callStack = debug.getcallstack() print("Number of calls:", #callStack) --> 3 print("Name of caller:", callStack[2].name) --> bar end local function bar() foo() end bar()